import request from '@/utils/request'

// 会员等级列表
export const userLevelListApi = (page:number) => request.get(`user_level/${page}`)

// 增加会员等级
interface addUserLevel {
    name :string,
    level:number,
    status : number,
    discount : number,
    max_price : number,
    max_times : number
}
export const addUserLevelApi = (data:addUserLevel) => request.post('user_level',{data})

// 修改会员等级
export const updataUserLevelApi = (id:number,data:addUserLevel) => request.post(`user_level/${id}`,{data})

// 修改会员等级状态
export const updataUserLevelStateApi = (id:number,status:number) => request.post(`user_level/${id}/update_status`,{status})

// 删除会员等级
export const removeUserLevelApi = (id:number) => request.post(`user_level/${id}/delete`)